package com.cnunicom.modules.business.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;

/**
 * 部门表
 *
 * @author dingziyuan
 * @email dzy998877@163.com
 * @date 2019-07-19 10:08:50
 */
@Data
@TableName("tb_business_dept")
public class BusinessDeptEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId
	private Long id;
	/**
	 * 部门名称
	 */
	@NotBlank
	private String name;
	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createdTime;
	/**
	 * 是否删除 0:未删除 1:已删除
	 */
	@Range(min = 0, max = 1, message = "数值越界")
	private Integer isDelete;
	/**
	 * 业务工作关联id
	 */
	@NotBlank
	private Integer businessId;

}
